import request, { Method, buyerUrl, expertUrl } from "@/plugins/request.js";
// 获取资讯列表
export function getList(data) {
  return request({
    url: expertUrl + "/expert/information/information/pagelist",
    method: Method.POST,
    headers: {
      "Content-Type": "application/json",
    },
    needToken: true,
    data,
  });
}
// id查询详情
export function getInfo(data) {
  return request({
    url: `${expertUrl}/expert/information/information/${data}`,
    method: Method.GET,
    headers: {
      "Content-Type": "application/x-www-form-urlencoded"
    },
    needToken: true,
    data
  });
}
// id查询详情
export function getInformatList(data) {
  return request({
    url: `${expertUrl}/expert/information/informationComment/commentTree`,
    method: Method.POST,
    headers: {
      "Content-Type": "application/json"
    },
    needToken: true,
    data
  });
}
// 查询评论
export function getCommentList(data) {
  return request({
    url: `${expertUrl}/expert/information/informationComment/commentTree`,
    method: Method.POST,
    headers: {
      "Content-Type": "application/json"
    },
    needToken: true,
    data
  });
}
// 查询二级评论
export function getCommentlist(data) {
  return request({
    url: `${expertUrl}/expert/information/informationComment/commentTreeDetail`,
    method: Method.POST,
    headers: {
      "Content-Type": "application/json"
    },
    needToken: true,
    data
  });
}
// 发表评论
export function publishComment(data) {
  return request({
    url: `${expertUrl}/expert/information/informationComment/saveComment`,
    method: Method.POST,
    headers: {
      "Content-Type": "application/json"
    },
    needToken: true,
    data
  });
}
// 回复一级评论
export function publishComment2(data) {
  return request({
    url: `${expertUrl}/expert/information/informationComment/saveComment`,
    method: Method.POST,
    headers: {
      "Content-Type": "application/json"
    },
    needToken: true,
    data
  });
}